"use strict";
const BaseImpl = require("../basics/clz/baseimpl");
const Constant = require("../basics/constant");
const Result = require("../basics/result");
const DateUtil = require("../utils/time");
const GenUtil = require("../utils/gen");
const BeneiftUtil = require("../taobao/beneift");
const UserInfoModel = require("../model/user_info");


/**
 * 通用服务
 */
class HomeImpl extends BaseImpl {


  /**
   * 查询排行
   * @param {*} params 
   */
  async findUser(params) {
    let { openId } = params;
    return await UserInfoModel.getInstant(this.cloud).selectOneByOpenId(openId);
  }
  

  async goOrder(params) {
    let {openId, mixNick, phone } = params;
    return await UserInfoModel.getInstant(this.cloud).goOrder(openId,mixNick,phone );
  }
  
  async deleteOrder() {
    return await UserInfoModel.getInstant(this.cloud).deleteOrder();
  }
}

module.exports = HomeImpl;